<!doctype html>
<html>

	<head>
			<meta charset="utf-8">

		<meta content='user-scalable=0' name='viewport' />
		<meta charset="utf-8">

		<title>我的城市</title>
		<link href="css/bootstrap.css" rel="stylesheet" type="text/css"></link>
		<link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css"></link>
		<link href="app/css/dorong.css" rel="stylesheet" type="text/css"></link>
	</head>
	<body>

		<div id="container">

		</div>

		<div id="dialog-div">

		</div>

		<div id="updates-page" class="dialog-page">
			<h2>更新</h2>
			<p>
				你可以通过下面的方式联系我 <a href="https://github.com/nyeholt" target="_blank">Github</a> or <a href="https://twitter.com/nyeholt" target="_blank">Twitter</a>. Or Reddit...
			</p>
			
			<p>
				Jul 12, 2014
			</p>
			
			<ul>
			<li>Simplified the initial phase of the game to be less overwhelming on first go, to try and lead people into the various bits and pieces. Still some work to go though - thanks to those who have given feedback around this!</li>
			<li>Added random process that will give a big boost boost or reduction in price for some items for a period of time</li>
			<li>Changed some of the types to be a little 'simpler' to get things going to avoid some of the pointless grind that could otherwise eventuate. Will be introducing some new elements around Crime and Pollution to counter this later on :)</li>
			<li>Mining consumption of Ore tweaked, removing the out-of-place 'Mine' button</li>
			<li>Changed batteries to be cheaper for getting Cash based energy, and replaced what they were with a Power Pack</li>
			<li>Added tidal power for power gen</li>
			<li>Reduced consumption and increased output of Nuclear power</li>
			</ul>

			<p>Still to come</p>

			<ul>
			<li>Better stats display</li>
			<li>Crime effects, countering buildings</li>
			<li>Deaths...</li>
			<li>Different building streams depending on how you're playing the game. ie Lots of Crime might mean thefts, murders etc, but you may have an option of buildings like strip clubs, drug dens etc...</li>
			</ul>
			
			<p>
				Jul 04, 2014
			</p>

			<ul>
				<li>Added new items - Plane, Truck, Highway, Airport</li>
				<li>Ability to destroy a building / fire an employee</li>
				<li>Improved market component to provide price fluctuations for buy/sell based on buy/sell events</li>
				<li>Always reload the last saved game on app init </li>
				<li>Account for pending queued builds when determining whether we can add more</li>
				<li>Further tweaking and adjustment of types and rates</li>
				<li>Added version checks for game saves</li>
			</ul>

			<p>

			</p>


		</div>

		<div id="about-page" class="dialog-page">
			<h2>关于</h2>
			<p>
				你可以通过下面的方式联系我 via <a href="https://github.com/nyeholt" target="_blank">Github</a> or <a href="https://twitter.com/nyeholt" target="_blank">Twitter</a>. 或者 Reddit...
			</p>

			<p>A brief summary is below...</p>

			<p>您可以通过单击以收获原始资源。</p>

			<ul>
				<li>Cash for buying things</li>
				<li>Brainpower for research</li>
				<li>Energy for running things</li>
				<li>Ore for providing base materials</li>
				<li>Water as a consumable</li>
				<li>Crime will make you pay... (not yet implemented) </li>
				<li>Pollution to make you sick</li>
			</ul>

			<p>Different employable roles  to do your clicking </p>

			<ul>
				<li>Employees make your Cash</li>
				<li>Miners dig your Ore</li>
				<li>Engineers are useful for... something</li>
				<li>Bankers increase your Cash</li>
				<li>Teachers provide your Brainpower</li>
				<li>Professors accelerate learning</li>
				<li>Scientists are a bit of an enigma still</li>
			</ul>

			<p>Different topics to assign research to - different topics provide different benefits</p>

			<ul>
				<li>Mining increases your ability to get things out of the ground</li>
				<li>Education is needed to speed up your brainpower</li>
				<li>Civics make everything a little better</li>
				<li>Economics improves your ability to spend (or save)</li>
				<li>Technology makes things easier
					<ul>
						<li>Manufacturing lets you build things</li>
						<li>mineable items</li>
						<li>goods to be built</li>
						<li>Buildings that either improve abilities, or perform actions on your behalf. </li>
					</ul>
				</li>


			</ul>

			<p>
				CC Attribution: still to be collated, but suffice to say that all icons in use are from 
				<a href="http://thenounproject.com/" target="_blank">The Noun Project</a> under the CC license. Specific
				icon licenses can be found in the icons/ folder - a full list will be collated once general dev
				slows a bit
			</p>

		</div>	

		<div id="graphdiv-container">
			<div id="graphoptions">
				<button id="graphclose">关闭</button>
				<button id="redraw">重绘</button>
				<div id="graphitems"></div>

			</div>
			<span id="graph">加载中...</span>
		</div>

		<script id="itemInfo" type="text/ractive">
			<td>
			<span class="item-amount">{{amount}} / {{maximum}} {{#amount >= 1 && !components.employable }}<button on-tap="destroy">X</button>{{/amount}} </span>
			</td>

			<td>
			{{#components.requires.topics :topic}}
			<span class="requirement"><img title="{{topic}}" src="{{iconfor(topic)}}" class="required-icon" /> {{this}}</span>
			{{/components}}
			{{#components.requires.items :item}}
			<span class="requirement"><img title="{{title}}" src="{{iconfor(item)}}" class="required-icon" /> {{this}}</span>
			{{/components}}
			</td>

			<td>
			{{#components.created.cost :resource}}
			<span class="requirement">
			<img title="{{resource}}" src="{{iconfor(resource)}}" class="required-icon" /> {{this}}
			</span>
			{{/components.created.cost}}
			</td>

			<td>
			{{#components.created.gives :resource}}
			<span class="requirement">
			<img title="{{resource}}" src="{{iconfor(resource)}}" class="required-icon" /> {{this}}
			</span>
			{{/components.created.gives}}
			</td>

			<td>
			{{#components.consumer.consumes :resource}}
			<span class="requirement"><img title="{{resource}}" src="{{iconfor(resource)}}" class="required-icon" /> {{this}}</span>
			{{/components}}
			{{#rates.consumer}}
			<span class="rate-info">
			/ {{rates.consumer}} ticks
			</span>
			{{/rates}}
			</td>

			<td>
			{{#components.worker.provides :resource}}
			<span class="requirement">
			<img title="{{resource}}" src="{{iconfor(resource)}}" class="required-icon" /> {{this}}
			</span>
			{{/components}}
			{{#rates.worker}}
			<span class="rate-info">
			/ {{rates.worker}} ticks
			</span>
			{{/rates}}
			</td>

			<td>
			{{#components.improves :resource}}
			<span class="requirement">
			<img title="{{resource}}" src="{{iconfor(resource)}}" class="required-icon" /> {{this * 100}}%

			</span>
			{{/components}}
			</td>

		</script>

		<script id="buildableRow" type="text/ractive">
			{{#this.meetsRequirements()}}
			<tr>
			<td class="build-col">
			{{#this.canBuy()}}
			<button title="{{title}}" on-tap="buyItem"><img title="{{title}}" src="{{icon}}" class="item-icon" /></button>
			{{/this}}
			{{^this.canBuy()}}
			<img title="{{title}}" src="{{icon}}" class="item-icon" />
			{{/this}}


			</td>

			<td>

			<select value="{{buyVolume}}">
			<option value="1">x1</option>
			<option value="10">x10</option>
			<option value="20">x20</option>
			<option value="50">x50</option>
			</select>

			</td>



			{{>itemInfo}}

			</tr>
			{{/meetsRequirements}}	
		</script>

		<script id='template' type='text/ractive'>

			<div id="raw-resources">
			{{# game.byComponent('collected') }}
				{{#this.meetsRequirements()}}
				<div class="raw-res">
				<button data-type="{{name}}" on-tap="collectItem" title="{{title}}: {{description}}" style="background-color: {{color}}">
				<img src="{{icon}}" title="{{title}}" class="raw-icon" />
				</button>
				<div class="resource-count">{{this.formattedAmount()}}</div>
				<div class="resource-max" title="{{rates.raw}}">{{maximum}}</div>
				<div class="resource-mods"></div>
				</div>
				{{/meetsRequirements}}
			{{/ game}}


			</div>

			<div id="population" class="holder">
				<h2>员工</h2>
				<p>雇佣员工为你做你的工作(点击)。为了吸引更多的人，建造一个市政厅。</p>
				<table>
				<thead>
				<tr>
				<th><img src="{{game.items.People.icon}}" title="人" class="item-icon" /></th>
				<th width="60px"></th>
				<th width="60px"></th>
				<th>{{game.items.People.amount}} / {{game.items.People.maximum}}</th>

				<th>需要</th>
				<th>花费</th>
				<th>给予</th>
				<th>消耗</th>
				<th>生产</th>
				<th>改善</th>

				</tr>
				</thead>
				<tbody>
				{{# game.byComponent('employable') }}
				{{#this.meetsRequirements()}}
				<tr>
				<td><img title="{{title}}" src="{{icon}}" class="item-icon" /></td>
				<td>{{#this.canBuy(1)}}<button on-tap="buyItem">雇佣</button>{{/this}}</td>
				<td>{{#amount >= 1}}<button on-tap="destroy">辞退</button>{{/amount}}</td>

				{{>itemInfo}}

				</tr>

				{{/meetsRequirements}}

				{{/game}}
				<tr>
				<td><img src="{{game.items.Sick.icon}}" title="病人" class="item-icon" /></td>
				<td>{{game.items.Sick.amount}}</td>

				<td><img src="{{game.items.Dead.icon}}" title="死人" class="item-icon" /></td>
				<td>{{game.items.Dead.amount}}</td>

				<td></td>

				<td></td>
				<td></td>
				<td></td>

				</tr>
				</tbody>
				</table>
			</div>

			<div id="knowledge" class="holder">
				<h2>研究</h2>
				<p>研究改善了现有的项目，并允许创建其他项目。</p>
				<p>创建学校和聘请教师来提高研究速度</p>
				<table>
				<tr>
				<th></th>
				<th></th>
				<th></th>
				<th width="10%">研究活动</th>
				</tr>
				{{#game.topics :topic_name}}
				<tr>
				<td><img src="{{icon}}" title="{{topic_name}}" class="item-icon" /></td>
				<td>等级 {{level}}</td>
				<td>
				<div><progress max="{{target}}" value="{{knowledge}}"></progress></div>
				<div class="progress-info">
				需要: 
				{{#game.byTopic(topic_name, level+1)}}
				<img title="{{title}}" src="{{icon}}" class="item-icon" />
				{{/game.byTopic }}
				</div>
				</td>
				<td class="knowledge-input">
				<input type="checkbox" checked="{{active}}" />
				</td>
				</tr>
				{{/ game.topics}}
				</table>
			</div>

			<div id="resources" class="holder">
				<div id="mined-resources">
				<h2>资源</h2>
				<p>这些资源构成了您可以创建的项目的基础，以及您可以构建的建筑物</p>
				<p>你可以用现金支付资源，也可以用矿山开采</p>
				<p>留意市场变化！</p>
				<table>
				<tr>

				<td></td>
				<td><!-- <button on-tap="mine">Mine now</button>--></td>

				<td width="90px">购买</td>
				<td width="90px">数量</td>
				<td width="90px">出售</td>

				</tr>

				<!-- display all market items - regardless of whether they're mined -->
				{{# game.byComponent('market') }}
				<tr>
				<td width="60%">
				<img title="{{title}}: {{description}}" class="item-icon" src="{{icon}}" /> <!-- {{rates.mined}}% chance -->
				</td>
				<td>
				<span class="resource-count">{{amount}} / {{maximum}}</span>
				</td>

				<td>
				{{#this.canBuy()}}
				<button title="{{title}}" on-tap="buyItem">
				${{formatted(components.market.buy * buyVolume)}}
				</button>
				{{/this}}
				</td>

				<td>
				<select value="{{buyVolume}}">
				<option value="1">x1</option>
				<option value="10">x10</option>
				<option value="20">x20</option>
				<option value="50">x50</option>
				<option value="100">x100</option>
				</select>
				</td>

				<td>
				{{#amount >= buyVolume}}
				<button title="{{title}}" on-tap="sellItem">
				${{formatted(components.market.sell * buyVolume)}}
				</button>
				{{/amount}}
				</td>

				</tr>
				{{/ game}}
				</table>
				</div>
			</div>

			<div id="creatable"  class="holder">
				<h2>物品</h2>
				
				<p>做些研究来解锁物品</p>
				
				<table class="items-table">
				<tr>
				<th width="60px">项目</th>
				<th width="60px"><!--volume dropdown --></th>
				<th width="100px">数量</th>
				<th>需求</th>
				<th>花费</th>
				<th>给予</th>
				<th>消耗</th>
				<th>产出</th>
				<th>改善</th>
				</tr>

				{{# game.byComponent('goods') }}

				{{>buildableRow}}

				{{/game}}
				</table>

				
				<h2>建筑</h2>
				
				<p>做些研究来解锁建筑</p>
				
				<table>
				<tr>
				<th width="60px">项目</th>
				<th width="60px"><!--volume dropdown --></th>
				<th width="100px">数量</th>
				<th>需要</th>
				<th>花费</th>
				<th>给予</th>
				<th>消耗</th>
				<th>生产</th>
				<th>改善</th>
				</tr>

				{{# game.byComponent('building') }}
				{{>buildableRow}}
				{{/game}}
				</table>
			</div>
			
			
			

			<div id="footer">

			<div id="build-queue" class="queue-container">
			{{#game.buildQueue}}
			<div class="buildQueueItem">
			<img title="{{title}}" src="{{item.icon}}" class="item-icon" /> 
			<div class="buildProgress">
			<progress max="{{totalSteps}}" value="{{currentStep}}"></progress>
			</div>
			</div>
			{{/game.buildQueue}}
			<div class="emptyfor spacing">&nbsp;</div>
			</div>

			<div id="messages" class="queue-container">
			{{#game.messages}}
			<div class="message {{class}}">
			<span class="msg-time">{{time}}</span> {{message}}
			</div>
			{{/game.messages}}
			<div class="emptyfor spacing">&nbsp;</div>
			</div>

			<div id="options" class="queue-container right-align-contents">
			<div class="graphopts">
			<select id="graphsrc">
			<option value="amounts">金额</option>
			<option value="rates">比率</option>
			<option value="totals">总计</option>
			</select>
			<button id="graphbtn">~</button>
			</div>
			<div>
			<a href="#updates-page" class="dialog-link">更新</a> .
			<a href="#about-page" class="dialog-link">关于</a> . 
			<button id="restart">重新开始</button>
			<button id="load">加载</button>
			<button id="save">保存</button>

			</div>
			</div>

			</div>
		</script>

		<script type="text/javascript" src="js/jquery-2.0.0.min.js"></script>
		<script type="text/javascript" src="js/jquery.sparkline.js"></script>
		<script type="text/javascript" src="js/ractive.js"></script>
		<script type="text/javascript" src="js/ractive-events-tap.js"></script>
		<script type="text/javascript" src="app/js/game.js"></script>
		<script type="text/javascript" src="app/js/agents.js"></script>
		<script type="text/javascript" src="app/js/types.js"></script>
		<script type="text/javascript" src="app/js/commands.js"></script>
		<script type="text/javascript" src="app/js/dorong.js"></script>
		<!--客服 开始-->
<link rel="stylesheet" href="//likexia.gitee.io/game/css/kf.css" type="text/css" media="screen" charset="utf-8">
<script src="//likexia.gitee.io/game/js/kf.js"></script>
<!-- 客服 结束 -->
	</body>
</html>